<!DOCTYPE html>
<html lang="it">
    <head>
<?php
    include 'connect.php';
    $result = mysql_query("SELECT * FROM info") or die ("Nighly Lodge non e' installato su questo spazio web, per proseguire con l'installazione, <a href=\"install.php\">Clicca qui</a>."); 
    $row = mysql_fetch_array($result);
    $titolo = $row['blog_nome'];
    $url = $row['blog_url'];
?>
        <title><?php echo $pagename . " " . $titolo;?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,700,700italic,400italic" />
        <link href='http://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo $path=$pagepath . CSS . "reset.css" ?>" />
<?php
    $result = mysql_query("SELECT * FROM temi") or die(mysql_error()); 
    $row = mysql_fetch_array($result);
    $stile = $row['nome_tema'];
?>
        <link rel="stylesheet" type="text/css" media="all" href="<?php echo $path=$pagepath . CSS . "$stile" ?>" />
        <link rel="shortcut icon" href="<?php echo $path=$pagepath . ICONS . "favicon.ico" ?>" />
    </head>
    <body>        
        <div id="navbar">
        <div class="container">          
                <div id="navbar-link">
                    <ul>
<?php
        include 'connect.php';       
        $sql = "SELECT * FROM navbar ORDER BY id ASC"; 
        $query = @mysql_query($sql) or die (mysql_error());
        if(mysql_num_rows($query) > 0){
            $assoc = mysql_fetch_array($query) or die (mysql_error());
            $nav_link = stripslashes($assoc['nav_nome']);
            $nav_link = $assoc['nav_url'];
            $result = mysql_query($sql) or die ("Errore: ".mysql_error());
            while($assoc = mysql_fetch_assoc($result)){
?>
                        <li><a href="<?=$assoc['nav_url'];?>"><?=$assoc['nav_nome'];?></a></li>
<?php                 
            }
        }
?>
                    </ul>
                </div>
                <div id="navbar-icon">
                    <ul id="social-icons">
                        <li><a href="https://www.facebook.com/"><img src="<?php echo $path=$pagepath . ICONS . "facebook.png" ?>"></a></li>
                        <li><a href="https://twitter.com/"><img src="<?php echo $path=$pagepath . ICONS . "twitter.png" ?>"></a></li>
                        <li><a href="https://plus.google.com/"><img src="<?php echo $path=$pagepath . ICONS . "googleplus.png" ?>"></a></li>
                        <li><a href="https://github.com/"><img src="<?php echo $path=$pagepath . ICONS . "github.png" ?>"></a></li>
                        <li><a href="http://www.youtube.com/"><img src="<?php echo $path=$pagepath . ICONS . "youtube.png" ?>"></a></li>
                        <li><a href="feed.php"><img src="<?php echo $path=$pagepath . ICONS . "rss.png" ?>"></a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="container">
            <div id="blog-nome"><?php echo "$titolo"; ?></div>
